< previous page page_526 next page >

Page 526
Quiz
1. What are the benefits of using SQL to create and manage data tables?
2. What is the format of the CREATE TABLE statement?
3. What is the default size of a Microsoft Jet TEXT field?
4. What SQL statement do you use to add a column to a table? What is its format?
5. What SQL statement do you use to remove a table from a database? What is the format of this statement?
6. What SQL statement creates an index to a data table?
7. What are the three forms of the CONSTRAINT clause?
Exercise
You have been assigned the responsibility of building a database of customers for your company. After careful review of the business processes and interviews with other users, you have determined that the following data must be maintained for the Customer database:
Table
Name
Field Type
CustomerType
CustomerType
TEXT(6)
Description
TEXT(30)
Customers
CustomerID
TEXT(10)
Name
TEXT(30)
CustomerType
TEXT(6)
Address
TEXT(30)
City
TEXT(30)
State
TEXT(30)
Zip
TEXT(10)
Phone
TEXT(14)
FAX
TEXT(14)

Use SQL-VB5 to build this structure. Include a primary key for each table and an index on Zip in the Customers table. Include any foreign key relationships that you think would increase database integrity. Name your database CH13EX.MDB. (You can use any path that you like for the .MDB file).

 
< previous page page_526 next page >

If you like this book, buy it!